import java.util.Objects;

public class Circle extends GeometricObject{
    private  double radius;

    public Circle() {
    }

    public Circle(double radius) {
        this.radius = 1.0;
    }

    public Circle(String color, double weight, double radius) {
        super(color, weight);
        this.radius = radius;
    }

    public double findArea(){
        return 3.14 * radius * radius;
    }



//    @Override
//    public String toString() {
//        return "Circle{" +
//                "radius=" + radius +
//                '}';
//    }


    public String toString(){
        return "Circle[radious = " + this.radius + "]";
    }

//    @Override
//    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (o == null || getClass() != o.getClass()) return false;
//        Circle circle = (Circle) o;
//        return Double.compare(circle.radius, radius) == 0;
//    }

    public boolean equals(Object obj){
        if (this == obj ){
            return  true;
        }
        if (obj instanceof Circle){
            Circle c = (Circle) obj;
            return this.radius == c.radius;

        }
        return false;
    }


}
